package com.cloud.wms.ui.in.entity;

import android.os.Parcel;

import com.cloud.wms.ui.main.entity.BatchEntity;

/**
 * @Author:Chen
 * @Date: 2021-01-26 10:38
 * @Description:
 */
public class ShelfBatchEntity extends BatchEntity {
    private int planAmount;
    private int upAmount;
//    private boolean isSelect;

    public int getPlanAmount() {
        return planAmount;
    }

    public void setPlanAmount(int planAmount) {
        this.planAmount = planAmount;
    }

    public int getUpAmount() {
        return upAmount;
    }

    public void setUpAmount(int upAmount) {
        this.upAmount = upAmount;
    }

    public boolean isSelect() {
        return isSelect;
    }

    public void setSelect(boolean select) {
        isSelect = select;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        super.writeToParcel(dest, flags);
        dest.writeInt(this.planAmount);
        dest.writeInt(this.upAmount);
        dest.writeByte(this.isSelect ? (byte) 1 : (byte) 0);
    }

    public ShelfBatchEntity() {
    }

    protected ShelfBatchEntity(Parcel in) {
        super(in);
        this.planAmount = in.readInt();
        this.upAmount = in.readInt();
        this.isSelect = in.readByte() != 0;
    }

    public static final Creator<ShelfBatchEntity> CREATOR = new Creator<ShelfBatchEntity>() {
        @Override
        public ShelfBatchEntity createFromParcel(Parcel source) {
            return new ShelfBatchEntity(source);
        }

        @Override
        public ShelfBatchEntity[] newArray(int size) {
            return new ShelfBatchEntity[size];
        }
    };
}
